package com.epoch.servicecourse.controller;

import com.epoch.servicecourse.service.VideoService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Seven
 * @date 2021/11/14
 */
@Slf4j
@RestController
@AllArgsConstructor
public class VideoController {
    @Autowired
    private VideoService videoService;

    /**
     * 获取视频
     * @param videoId
     * @param response
     * @param request
     */
    @ApiOperation(value = "资源版块")
    @GetMapping("epoch/resource/video/getVideo/{videoId}")
    public void getVideo(@PathVariable("videoId") Integer videoId, HttpServletResponse response, HttpServletRequest request){
        videoService.getVideo(videoId, response, request);
    }

}

